package ru.papergames.battleserver.network.serverpackets.flashuser;

import ru.papergames.battleserver.model.battle.BattlePlayer;

/**
 * @author Alexander Troshanin
 */
public class BattleFinished extends PaperGameServerPacket {

    private final BattlePlayer player;
    private boolean winner;

    public BattleFinished(BattlePlayer player, boolean winner) {
        this.player = player;
        this.winner = winner;
    }

    @Override
    protected int getPacketId() {
        return BATTLE_FINISHED_PACKET_ID;
    }

    @Override
    protected void writePacketData() {
        writeBool(winner);
        // TODO: add statistics
    }

}
